package com.neusoft.feign;

import com.neusoft.po.Cart;
import com.neusoft.po.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;

import java.math.BigDecimal;
import java.util.List;

//指定调用的微服务名
@FeignClient(name="virtualwallet-server",fallback=VirtualwalletFeignClientCallBack.class)
public interface VirtualwalletFeignClient {

    /*@RequestMapping("/virtualwallet-server")
    public CommonResult<List> listCart(Cart cart);

    @RequestMapping("/clearCart")
    public CommonResult<Integer> clearCart(Cart cart);*/

    @PutMapping("/Virtualwallet/RechargeByUserId/{userId}/{add_balance}")
    public CommonResult<Integer> rechargeByUserId(@PathVariable("userId") String userId, @PathVariable("add_balance") BigDecimal add_balance);

    //跟据用户ID提现
    @PutMapping("/Virtualwallet/PayoutByUserId/{userId}/{sub_balance}")
    public CommonResult<Integer> payoutByUserId(@PathVariable("userId") String userId,@PathVariable("sub_balance") BigDecimal sub_balance);

}